<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Zone_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-zone_id" data-rule="required" data-source="tongcheng/zone/index" class="form-control selectpage" name="row[zone_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="typeList" item="vo"}
                <label for="row[type]-{$key}"><input id="row[type]-{$key}" name="row[type]" type="radio" value="{$key}" {in name="key" value="VOUCHER"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('get_type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="getTypeList" item="vo"}
                <label for="row[get_type]-{$key}"><input id="row[get_type]-{$key}" name="row[get_type]" type="radio" value="{$key}" {in name="key" value="index"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" data-favisible="get_type=assign">
        <label class="control-label col-xs-12 col-sm-2">{:__('assign_type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="assignTypeList" item="vo"}
                <label for="row[assign_type]-{$key}"><input id="row[assign_type]-{$key}" name="row[assign_type]" type="radio" value="{$key}" {in name="key" value="none"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" data-favisible="get_type=assign&&assign_type=users">
        <label class="control-label col-xs-12 col-sm-2">{:__('assign_user_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-assign_user_ids" data-source="user/user/index" class="form-control selectpage" data-multiple="true" data-params='{"custom[status]":"normal"}' data-field="nickname" data-format-item="{nickname}({id})" name="row[assign_user_ids]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="">
        </div>
    </div>
    <div class="form-group" data-favisible="type=FULL||type=VOUCHER">
        <label class="control-label col-xs-12 col-sm-2">{:__('Money')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-money" data-rule="required" class="form-control" step="0.01" name="row[money]" type="number" value="0.00" placeholder="优惠券抵扣金额">
        </div>
    </div>
    <div class="form-group" data-favisible="type=DISCOUNT">
        <label class="control-label col-xs-12 col-sm-2">{:__('discount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-discount" class="form-control" step="0.1" name="row[discount]" type="number" value="0.0" placeholder="优惠券折扣比例（仅抵扣配送费）">
            <p class="help-block">* 注意：折扣券折扣优惠仅按骑手配送费计算，小费、预付费不加入计算优惠</p>
        </div>
    </div>
    <div class="form-group" data-favisible="type=FULL||type=DISCOUNT">
        <label class="control-label col-xs-12 col-sm-2">{:__('Min_money')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-min_money" data-rule="required" class="form-control" step="0.01" name="row[min_money]" type="number" value="0.00" placeholder="金额达到多少才能使用">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Expire_day')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-expire_day" data-rule="required" class="form-control" name="row[expire_day]" type="number" value="0" placeholder="领取后多少天内有效，必须大于0">
        </div>
    </div>
    <div class="form-group" data-favisible="get_type=index">
        <label class="control-label col-xs-12 col-sm-2">{:__('limit_use')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-limit_use" class="form-control" name="row[limit_use]" type="number" value="0" placeholder="填0不限制">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Total')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total" data-rule="required" class="form-control" name="row[total]" type="number" value="0" placeholder="优惠券发放总数量">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
